package br.com.ustore.agent.backup.producer;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import br.com.ustore.agent.backup.domain.BackupData;

@Service("agentBackupService")
public class AgentBackupService {
	static int orderSequence = 1;
	
	@Autowired
	private AgentBackupSender agentBackupSender;
	public void setOrderSender(AgentBackupSender agentBackupSender){
		this.agentBackupSender = agentBackupSender;
	}
	
	public void sendData(long path_id, long start_time, long end_time, int numberOfPeers, long fileLength)
	{
		BackupData backupsData = new BackupData(path_id, start_time, end_time, numberOfPeers, fileLength);
		agentBackupSender.sendData(backupsData);
	}
}